package com.blue.seata.order.api.remote;

import com.blue.seata.common.JsonResult;
import com.blue.seata.order.api.fallback.RemoteOrderServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 订单feign接口
 *
 * @author liulei
 * @version 1.0
 */
@FeignClient(name = "order", path = "order", fallbackFactory = RemoteOrderServiceFallbackFactory.class)
public interface RemoteOrderService {

    /**
     * 创建订单信息
     *
     * @param userId 账户
     * @param code   商品code
     * @param count  个数
     * @return json
     */
    @RequestMapping(value = "/test/create", method = RequestMethod.GET)
    JsonResult create(@RequestParam("userId") String userId, @RequestParam("code") String code, @RequestParam("count") Integer count);
}
